package view;


import java.awt.Dimension;

import javax.swing.JFrame;
//import javax.swing.JMenuBar;
import javax.swing.JMenuBar;

public class ViewFrame extends JFrame {

	private static View basepanel;
	private static  JFrame frame;
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 7224334486299356731L;

	public ViewFrame() {
		frame = new JFrame("Blackjack");
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setPreferredSize(new Dimension(1132, 611));
		frame.setResizable(false);

		
		
		basepanel = new StartView();
		basepanel.setSize(getSize());
		basepanel.setLayout(null);

		frame.add(basepanel);
		frame.pack();

		frame.setVisible(true);

	}
	
	public void setViewMenuBar(view.MenuBar menu){
		frame.setJMenuBar(menu);
	}
	

	public static void setBasePanel(View type){
		
		frame.remove(basepanel);
		basepanel = type;
		frame.add(basepanel);
		frame.pack();

	}

		
}
